$OpenBSD: patch-libs_coroutine_source_asm_S,v 1.1 2013/03/21 22:21:05 sthen Exp $

use movw with (16-bit) segment registers.

--- libs/coroutine/source/asm.S.orig	Thu Mar 21 16:17:29 2013
+++ libs/coroutine/source/asm.S	Thu Mar 21 16:17:48 2013
@@ -39,10 +39,10 @@
 SET:
 	movl	4(%esp), %eax
 
-	movl	8(%eax), %fs
-	movl	12(%eax), %es
-	movl	16(%eax), %ds
-	movl	76(%eax), %ss
+	movw	8(%eax), %fs
+	movw	12(%eax), %es
+	movw	16(%eax), %ds
+	movw	76(%eax), %ss
 	movl	20(%eax), %edi
 	movl	24(%eax), %esi
 	movl	28(%eax), %ebp
@@ -59,10 +59,10 @@ SET:
 GET:
 	movl	4(%esp), %eax
 
-	movl	%fs, 8(%eax)
-	movl	%es, 12(%eax)
-	movl	%ds, 16(%eax)
-	movl	%ss, 76(%eax)
+	movw	%fs, 8(%eax)
+	movw	%es, 12(%eax)
+	movw	%ds, 16(%eax)
+	movw	%ss, 76(%eax)
 	movl	%edi, 20(%eax)
 	movl	%esi, 24(%eax)
 	movl	%ebp, 28(%eax)
